package cn.edu.seu.cose.qol.model.dto.question;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlType(name = "questionBases", propOrder = {"_briefQuestionBases"})
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "questionnaire")
public class Questionnaire {
	
	@XmlElement(name = "name")
	private String _name;
	
	@XmlElementWrapper(name = "questionbases")
	@XmlElement(name = "questionbase")
	private AddressableQuestionBaseInstance[] _addressableQuestionBases;
	
	public Questionnaire() {
		this(null, new AddressableQuestionBaseInstance[0]);
	}

	public Questionnaire(String name) {
		this(name, new AddressableQuestionBaseInstance[0]);
	}
	
	public Questionnaire(String name,
			AddressableQuestionBaseInstance[] addressableQuestionBases) {
		_addressableQuestionBases = addressableQuestionBases;
	}
	
	public String getName() {
		return _name;
	}
	
	public void setName(String name) {
		_name = name;
	}
	
	public AddressableQuestionBaseInstance[] getAddressableQuestionBases() {
		return _addressableQuestionBases;
	}
	
	public void setAddressableQuestionBases(AddressableQuestionBaseInstance[] addressableQuestionBases) {
		_addressableQuestionBases = addressableQuestionBases;
	}

}
